package com.example.hms.controller;

import com.example.hms.entity.Live;
import com.example.hms.service.LiveService;
import com.example.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


@RestController
@RequestMapping("/live")
public class LiveController {
    @Resource
    private LiveService liveService;

    // 查询
    @RequestMapping(value = "/selectAllLive", method = RequestMethod.GET)
    Result selectAllLive(Live live){
        return liveService.selectAllLive(live);
    }

    // 结算
    @RequestMapping(value = "/settlementLive", method = RequestMethod.GET)
    Result settlementLive(Live live, HttpServletRequest request){
        return liveService.settlementLive(live,request);
    }

    // 确认收款
    @RequestMapping(value = "/collectionLive", method = RequestMethod.GET)
    Result collectionLive(Live live, HttpServletRequest request){
        return liveService.collectionLive(live,request);
    }

}
